package com.practice.sequence;

import java.util.ArrayList;

public class CountArray {
	public int[] recover(int[] a) {
		int[] s = new int[a.length];
		ArrayList<Integer> list = new ArrayList<Integer>();
		for (int i=0; i<a.length; i++) list.add(i+1);
		
		for (int i=0; i<a.length; i++) {
			s[i] = list.remove(a[i]);
		}
		
		return s;
	}
}
